function Get-CentralCompaniesFromDB {
    [CmdletBinding()]
    [OutputType([string[]])]
    param (
        [Parameter(Mandatory = $true)][LSCentralParameters]$LSCentral
    )

    Write-Verbose "Attempting to fetch companies from the server '$($LSCentral.Server.Name -replace '\\+', '\')'..."

    $query = 'SELECT RANK() OVER (ORDER BY timestamp DESC) AS CompanyID ,[Name] AS CompanyName FROM [dbo].[Company]'
    $LSCentral.Server.Credential.Password.MakeReadOnly()
    [System.Data.SqlClient.SqlCredential]$SourceCredentials = New-Object System.Data.SqlClient.SqlCredential($LSCentral.Server.Credential.UserName, $LSCentral.Server.Credential.Password)
    $connSuccess, $queryResults = Test-LSSQLConnection $SourceCredentials $LSCentral.Server.Name $LSCentral.Database.Name -query $query

    if ($connSuccess -and $queryResults.Rows.Count -gt 0) {
        return $queryResults.Rows.CompanyName       
    } else {
        Write-Host # Newline.
        Write-Warning "Couldn't get a list of companies from the LS Central database."
        return @()
    } 
}